package com.knight.annotation;

import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringAnnotationClient {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext applicationContext =
                new AnnotationConfigApplicationContext();

        applicationContext.register(PersonConfiguration.class);
        System.out.println("before");
        applicationContext.refresh();
        System.out.println("after");
        Person person = applicationContext.getBean("person", Person.class);
        System.out.println(person);


    }
}
